cc.Class({
    extends: cc.Component,

    properties: {
        prefab:cc.Prefab,
        //poss:js.array,
        pos1:cc.Vec2,
        pos2:cc.Vec2,
        pos3:cc.Vec2,
        pos4:cc.Vec2
        
        
        // foo: {
        //    default: null,
        //    url: cc.Texture2D,  // optional, default is typeof default
        //    serializable: true, // optional, default is true
        //    visible: true,      // optional, default is true
        //    displayName: 'Foo', // optional
        //    readonly: false,    // optional, default is false
        // },
        // ...
    },

    // use this for initialization
    onLoad: function () {

    },
    
    initShapePos: function() {
        var a = new Array(cc.p(0,0),cc.p(20,0),cc.p(0,20),cc.p(20,-20))
        for(var i=0;i < 4;i++)
        {
            //this.prefab:createNode()
            var single = cc.instantiate(this.prefab);
            single.parent = this.root;
            //this.canvas.node.addChild(monster);
            var tmp = "pos"+i+1;
            single.position = a[i];
            this.node.addChild(single)
        }
    },

    // called every frame, uncomment this function to activate update callback
    // update: function (dt) {

    // },
});
